package com.ruoyi.resturant.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@ApiModel(value = "Student", description = "学生实体")
public class Student {
    @ApiModelProperty("编号")
    private  Long id;
    //学号不为null
    @NotBlank(message = "学号不能为空")
    @ApiModelProperty("学号")
    private  String sno;

    //姓名长度要求2到6
    @Size(min=2,max = 6,message = "姓名长度必须在2-6之间")
    @ApiModelProperty("姓名")
    private  String name;
    @ApiModelProperty("性别")
    private  String sex;
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getSno() {
        return sno;
    }

    public void setSno(String sno) {
        this.sno = sno;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }


}
